/*****************************************************************************
*
*  PROJECT:     SlipStream
*               (bumpMapping - bumpMapping class)
*  LICENSE:     GNU General Public License v3 - http://www.gnu.org/licenses/gpl.html

*  DEVELOPERS:  Philip Farquharson 	<B00137077@studentmail.uws.ac.uk>
*				John Gray 			<B00145524@studentmail.uws.ac.uk>		
*				Zohaib Bhatti		<B00104280@studentmail.uws.ac.uk>
*				Euan Hislop 		<B00138636@studentmail.uws.ac.uk>
*
*****************************************************************************/

#ifndef BUMPMAPPING_H
#define BUMPMAPPING_H
#include <GL/glut.h>
#include <Cg/cg.h>
#include <Cg/cgGL.h>
#include <windows.h>								
#include <windowsx.h>

class bumpMapping
{
	private:		
		CGcontext	cgContext;								// A Context To Hold Our Cg Program(s)
		CGprogram	cgVertProg;								// Our Cg Vertex Program
		CGprogram	cgFragProg;
		CGprofile	cgVertexProfile, cgFragProfile;	

		CGparameter	cgModelViewProj, cgInvModelMatrix, cgLightPosW, cgTangent;
		CGparameter	cgTexture, cgNormalMap, cgNormaliseCubeMap;

	public:
		bumpMapping();
		~bumpMapping();
		
		void setLightXNeg(GLfloat xChange);
		void setLightXPos(GLfloat xChange);
		void setLightYPos(GLfloat yChange);
		void setLightYNeg(GLfloat yChange);
		void setLightZPos(GLfloat Zchange);
		void setLightZNeg(GLfloat zChange);
		bool init();		
		void drawWall();
		void renderBumpMap();
		bool LoadBitmap(LPTSTR szFileName, GLuint &texid, GLuint target);
		bool loadTexture(char * filename, GLuint * pTexture);
		bool loadFace(GLenum target, char *filename);
		int	 loadGLTextures();		
};

#endif 